def compare_x(a0, a1):
    print(a0, a1)
    list_0 = a0.split(".")
    list_1 = a1.split(".")
    list_0 = [int(i) for i in list_0]
    list_1 = [int(i) for i in list_1]
    print(list_0, list_1)
    short_length = len(list_0)
    if len(list_0) > len(list_1):
        short_length = len(list_1)
    for i in range(short_length):
        v1 = list_0[i]
        v2 = list_1[i]
        if v1 > v2:
            return 1
        elif v1 < v2:
            return -1
        elif i != short_length-1:
            continue
        else:
            if len(list_0) > len(list_1):
                return 1
            elif len(list_0) < len(list_1):
                return -1
            else:
                return 0

    pass
if __name__ == '__main__':
    a0 = input("第1个版本：")
    a1 = input("第2个版本：")
    result = compare_x(a0, a1)
    print("result:", result)
    pass